<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<html>
	<head>
		<title>Today's Comic Strips</title>
	</head>
	<body>
		<div>
			<sec:authentication property="principal.user.name" />
		
			<a href="/preferences.do">Preferences</a> 
			
			<a href="j_spring_security_logout">Log out</a>
		</div>
		
		<h1>Change preferences</h1>
		
		<form:form commandName="preferences" method="POST">
			Comic strips: <br />
			<form:checkboxes path="stripNames" items="${stripNames}" delimiter="<br />" />
			<br />
			<input type="submit" value="Save" />
		</form:form>
	</body>
</html>